<!DOCTYPE html>
<!--suppress ALL-->
<html xmlns:th="http://www.thymeleaf.org">
<head lang="en">
    <base th:href="@{/}">
    <meta charset="utf-8" />
    <title>最家</title>
    <link rel="stylesheet" type="text/css" href="css/public.css"/>
    <link rel="stylesheet" type="text/css" href="css/myorder.css" />
</head>
<body>
<!------------------------------head------------------------------>
<div class="head ding">
    <div class="wrapper clearfix">
        <div class="clearfix" id="top">
            <h1 class="fl"><a href="index.html"><img src="img/logo.png"/></a></h1>
            <div class="fr clearfix" id="top1">
                <p class="fl">
                    <a href="#" id="login">登录</a>
                    <a href="#" id="reg">注册</a>
                </p>
                <form action="#" method="get" class="fl">
                    <input type="text" placeholder="搜索" />
                    <input type="button" />
                </form>
                <div class="btn fl clearfix">
                    <a href="mygxin.html"><img src="img/grzx.png"/></a>
                    <a href="#" class="er1"><img src="img/ewm.png"/></a>
                    <a href="cart.html"><img src="img/gwc.png"/></a>
                    <p><a href="#"><img src="img/smewm.png"/></a></p>
                </div>
            </div>
        </div>
        <ul class="clearfix" id="bott">
            <li><a href="index.html">首页</a></li>
            <li>
                <a href="#">所有商品</a>
                <div class="sList">
                    <div class="wrapper  clearfix">
                        <a href="paint.html">
                            <dl>
                                <dt><img src="img/nav1.jpg"/></dt>
                                <dd>浓情欧式</dd>
                            </dl>
                        </a>
                        <a href="paint.html">
                            <dl>
                                <dt><img src="img/nav2.jpg"/></dt>
                                <dd>浪漫美式</dd>
                            </dl>
                        </a>
                        <a href="paint.html">
                            <dl>
                                <dt><img src="img/nav3.jpg"/></dt>
                                <dd>雅致中式</dd>
                            </dl>
                        </a>
                        <a href="paint.html">
                            <dl>
                                <dt><img src="img/nav6.jpg"/></dt>
                                <dd>简约现代</dd>
                            </dl>
                        </a>
                        <a href="paint.html">
                            <dl>
                                <dt><img src="img/nav7.jpg"/></dt>
                                <dd>创意装饰</dd>
                            </dl>
                        </a>
                    </div>
                </div>
            </li>
            <li>
                <a href="flowerDer.html">装饰摆件</a>
                <div class="sList2">
                    <div class="clearfix">
                        <a href="proList.html">干花花艺</a>
                        <a href="vase_proList.html">花瓶花器</a>
                    </div>
                </div>
            </li>
            <li>
                <a href="decoration.html">布艺软饰</a>
                <div class="sList2">
                    <div class="clearfix">
                        <a href="zbproList.html">桌布罩件</a>
                        <a href="bzproList.html">抱枕靠垫</a>
                    </div>
                </div>
            </li>
            <li><a href="paint.html">墙式壁挂</a></li>
            <li><a href="perfume.html">蜡艺香薰</a></li>
            <li><a href="idea.html">创意家居</a></li>
        </ul>
    </div>
</div>
<!------------------------------idea------------------------------>
<div class="address mt">
    <div class="wrapper clearfix">
        <a href="index.html" class="fl">首页</a>
        <span>/</span>
        <a href="mygxin.html" class="on">个人中心</a>
        <span>/</span>
        <a href="myprod.html" class="on">待评价商品</a>
    </div>
</div>


<!------------------------------Bott------------------------------>
<div class="Bott">
    <div class="wrapper clearfix">
        <div class="zuo fl">
            <h3>
                <a href="#"><img src="img/tx.png"/></a>
                <p class="clearfix"><span class="fl">[羊羊羊]</span><span class="fr">[退出登录]</span></p>
            </h3>
            <div>
                <h4>我的交易</h4>
                <ul>
                    <li><a href="cart.html">我的购物车</a></li>
                    <li><a href="myorderq.html">我的订单</a></li>
                    <li class="on"><a href="myprod.html">评价晒单</a></li>
                </ul>
                <h4>个人中心</h4>
                <ul>
                    <li><a href="mygxin.html">我的中心</a></li>
                    <li><a href="address.html">地址管理</a></li>
                </ul>
                <h4>账户管理</h4>
                <ul>
                    <li><a href="mygrxx.html">个人信息</a></li>
                    <li><a href="remima.html">修改密码</a></li>
                </ul>
            </div>
        </div>
        <div class="you fl">
            <div class="my clearfix">
                <h2 class="fl">商品评价</h2>
            </div>
            <div class="dlist">
                <ul class="clearfix" id="pro">
                    <li><a th:href="@{/trade/toOrderCommentPage}">待评价商品</a></li>
                    <li class="on"><a th:href="@{/trade/toOrderCommentedPage}">已评价商品</a></li>
                </ul>
            </div>
            <div class="sx clearfix">
                <div class="clearfix">
                    <dl class="fl"  th:each="commentedGood: ${commentedGoods}">
                        <input type="hidden" id="conmmentId" th:value="${commentedGood.commentId}">
                        <input type="hidden" id="proId" th:value="${commentedGood.proId}">
                        <input type="hidden" id="userId" th:value="${commentedGood.userId}">
                        <dt><a><img style="width: 80px;height: 80px;" th:src="'img/' + ${commentedGood.proPhoto}"/></a></dt>
                        <dd><a th:text="${commentedGood.proName}"></a></dd>
                        <dd th:text="${commentedGood.price}"></dd>
                        <dd>16000人评价</dd>
                        <dd><a th:href="'javascript:hadComments('+ ${commentedGood.commentId} +')'">评价</a></dd>
                    </dl>
                </div>

            </div>
        </div>
    </div>
</div>

<!--<dl class="fl">
                    <dt><a href="#"><img src="img/nav3.jpg"/></a></dt>
                    <dd><a href="#">家用创意壁挂  釉下彩复古</a></dd>
                    <dd>¥199.00</dd>
                    <dd>16000人评价</dd>
                    <dd><a href="#">待评价</a></dd>
                </dl>
                <dl class="fl">
                    <dt><a href="#"><img src="img/nav3.jpg"/></a></dt>
                    <dd><a href="#">家用创意壁挂  釉下彩复古</a></dd>
                    <dd>¥199.00</dd>
                    <dd>16000人评价</dd>
                    <dd><a href="#">待评价</a></dd>
                </dl>-->

<!--遮罩-->
<div class="mask"></div>
<!--评价弹框-->
<div class="pj">
    <div class="clearfix"><a href="#" class="fr gb"><img src="img/icon4.png"/></a></div>
    <h3>商品评分</h3>
    <form action="#" method="get">
        <div class="clearfix">
            <p class="fl">请打分：</p>
            <p class="fl" id="xin">
                <a><img src="img/xin.png"/></a>
                <a><img src="img/xin.png"/></a>
                <a><img src="img/xin.png"/></a>
                <a><img src="img/xin.png"/></a>
                <a><img src="img/xin.png"/></a>
            </p>
        </div>
        <textarea id="comment" name="" rows="" cols="" placeholder="请输入评价" ></textarea>
        <div class="bc">
            <input type="button" id="updateComment" value="修改" />
            <input type="button" value="取消" />
        </div>
    </form>
</div>
<!--查看评价-->
<div class="chak">
    <div class="clearfix"><a href="#" class="fr gb"><img src="img/icon4.png"/></a></div>
    <h3>商品评分</h3>
    <form action="#" method="get">
        <div class="clearfix">
            <p class="fl">请打分：</p>
            <p class="fl" id="xin">
                <a><img src="img/hxin.png"/></a>
                <a><img src="img/hxin.png"/></a>
                <a><img src="img/hxin.png"/></a>
                <a><img src="img/hxin.png"/></a>
                <a><img src="img/hxin.png"/></a>
            </p>
        </div>
        <textarea name="" rows="" cols="" placeholder="请输入评价" ></textarea>
        <div class="bc">
            <input type="button" value="保存"  />
            <input type="button" value="取消" />
        </div>
    </form>
</div>




<!--返回顶部-->
<div class="gotop">
    <a href="cart.html">
        <dl>
            <dt><img src="img/gt1.png"/></dt>
            <dd>去购<br />物车</dd>
        </dl>
    </a>
    <a href="#" class="dh">
        <dl>
            <dt><img src="img/gt2.png"/></dt>
            <dd>联系<br />客服</dd>
        </dl>
    </a>
    <a href="mygxin.html">
        <dl>
            <dt><img src="img/gt3.png"/></dt>
            <dd>个人<br />中心</dd>
        </dl>
    </a>
    <a href="#" class="toptop" style="display: none">
        <dl>
            <dt><img src="img/gt4.png"/></dt>
            <dd>返回<br />顶部</dd>
        </dl>
    </a>
    <p>400-800-8200</p>
</div>
<!--footer-->
<div class="footer">
    <div class="top">
        <div class="wrapper">
            <div class="clearfix">
                <a href="#2" class="fl"><img src="img/foot1.png"/></a>
                <span class="fl">7天无理由退货</span>
            </div>
            <div class="clearfix">
                <a href="#2" class="fl"><img src="img/foot2.png"/></a>
                <span class="fl">15天免费换货</span>
            </div>
            <div class="clearfix">
                <a href="#2" class="fl"><img src="img/foot3.png"/></a>
                <span class="fl">满599包邮</span>
            </div>
            <div class="clearfix">
                <a href="#2" class="fl"><img src="img/foot4.png"/></a>
                <span class="fl">手机特色服务</span>
            </div>
        </div>
    </div>
    <p class="dibu">最家家居&copy;2013-2017公司版权所有 京ICP备080100-44备0000111000号<br />
        违法和不良信息举报电话：400-800-8200，本网站所列数据，除特殊说明，所有数据均出自我司实验室测试</p>
</div>
<script src="js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/public.js" type="text/javascript" charset="utf-8"></script>
<script src="js/user.js" type="text/javascript" charset="utf-8"></script>
<script src="layui/layui.js"></script>
<script>
    function hadComments(commentId) {
        var param = {"commentId": commentId};
        $.post("/furniture/trade/findComments", param, function (data) {
            if (data.state == 200){
                $("#comment").html(data.message);
            }else{
                layer.msg(data.message);
            }
        });
    }

    $("#updateComment").click(function () {
        var commentId = $("#conmmentId").val();
        var comment = $("#comment").val();
        var param = {"commentId": commentId, "comment": comment};
        $.post("/furniture/trade/updateComments", param, function (data) {
            if (data.state == 200){
                layer.msg(data.message);
            }else {
                layer.msg(data.message);
            }
        });
    });
</script>
</body>
</html>